<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Resume</title>
</head>
<body>
   <div>
      <table border="1px">
        <caption>个人简历</caption>
             <tr>
               <td>照片</td>
               <td id="imgId"></td>
             </tr>
             <tr>
               <td>姓名</td>
               <td id="nameId"></td>
             </tr>
             <tr>
               <td>年龄</td>
               <td id="ageId"></td>
             </tr>
            <tr>
              <td>爱好</td>
              <td id="loveId"></td>
            </tr>
      </table>
   </div>
   <script>
      let info={
        name:"张三",
        age:18,
        img:"images/1.png",
        love:["吃饭","睡觉","打豆豆"]
      }
      document.getElementById("imgId").innerHTML="<img src='"+info.img+"'/>";
      document.getElementById("nameId").innerHTML=info.name;
      document.getElementById("ageId").innerHTML=info.age;
      let ul=document.createElement("ul");
      for(let i=0;i<info.love.length;i++){
        let li=document.createElement("li");
        li.innerHTML=info.love[i];
        ul.appendChild(li);
      }
      document.getElementById("loveId").appendChild(ul);

   </script>
</body>
</html>